package com.ziytek.web.citizen.model.bean;

import com.ziytek.web.citizen.constant.NumConstant;
import lombok.Data;

/**
 * @author fengh
 */
@Data
public class CommandIssuedSuccess {
    private String reqCabinetNo;
    private String door;
    private String settings;
    private Integer boardNo;
    private Integer channelNo;
    private Long stepId;
    private Long interruptOrEndStepId;
    private Integer order;

    /**
     * 预计执行时间(正整数,单位秒) setType = standing时必须大于0
     */
    private Integer expectedTimeSecond;

    /**
     * 工步已执行时间 单位秒
     */
    private Long hasExecutedTime = 0L;

    /**
     * 工步类型
     */
    private String setType;

    /**
     * 单通道控制指令下发
     */
    public boolean isSingleChannel() {
        return null != boardNo && NumConstant.INT_TWO_FIFTY_FIVE != boardNo;
    }

    public void setInit(String cab, String door, long stepId, int boardNo, int channelNo, int order) {
        this.door = door;
        this.order = order;
        this.stepId = stepId;
        this.boardNo = boardNo;
        this.reqCabinetNo = cab;
        this.channelNo = channelNo;
    }
}
